LoginPanel={};
local this = LoginPanel;


function LoginPanel.New()
    panelMgr:CreatePanel("Login",nil);
end

function LoginPanel.OnCreate(go)
    
end

function LoginPanel.OnClick()
    log(this.username.text);
   HallPanel.New();
   panelMgr:ClosePanel('Login');
    
end

function LoginPanel.Awake(go)
    log("LoginPanel.Awake");
    this.gameObject=go;
    this.transform=go.transform;
    local behavior = this.transform:GetComponent('LuaBehaviour');
    this. username = this.transform:Find("UserName"):GetComponent('InputField');
    this. password = this.transform:Find("PassWord"):GetComponent('InputField');
    this.slider=this.transform:Find("Slider").gameObject;
    behavior:AddSlider(this.slider,this.OnSliderChange);

this.loginBtn=this.transform:Find("LoginBtn").gameObject;
behavior:AddClick(this.loginBtn,this.OnClick);
end

function LoginPanel.OnSlierChange(value)

    print("value:"..value);
    
end

function LoginPanel.Start()
    log("LoginPanel.Start");
end